<me:SDBASE x:Class="WPFExcelReport.KL267"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                     xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:me="clr-namespace:WPFExcelReport" 
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:WF="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTS"   
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:SDBASE.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:SDBASE.Resources>
    <WrapPanel> 
        <ListBox    ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                     Visibility="{Binding IsCombo,ElementName=TV,Converter={StaticResource nbv}}" 
                    Name="cList"
                     ScrollViewer.CanContentScroll="True">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel  MaxWidth="400"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                
                <DataTemplate>
                    <Border Margin="4,2,2,2" Grid.Column="2" BorderThickness="2" CornerRadius="4">
                        <Border.BorderBrush>                            
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> 
                                <GradientStop Color="#aaa" Offset="0" /> 
                                <GradientStop Color="#222" Offset="1" /> 
                            </LinearGradientBrush> 
                        </Border.BorderBrush>
                        <Grid Width="100">
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                            <TextBlock Grid.Row="0" Text="{Binding Path=SDES,Converter={StaticResource gb2312}}" TextAlignment ="Center"/>
                            <TextBlock Grid.Row="1" Text="{Binding Path=KEY}" TextAlignment ="Center"/>
                    </Grid>
                    </Border>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </WrapPanel>
</me:SDBASE>
